<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of histRegionsCoverage</title>
  <meta name="keywords" content="histRegionsCoverage">
  <meta name="description" content="Coverage of histone modification marks grouped by regions (GM06990, chrm 7)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">code</a> &gt; <a href="index.html">examples</a> &gt; histRegionsCoverage.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for code\examples&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>histRegionsCoverage
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Coverage of histone modification marks grouped by regions (GM06990, chrm 7)</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function histRegionsCoverage() </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Coverage of histone modification marks grouped by regions (GM06990, chrm 7)


 SYNTAX: [] = histRegionsCoverage()

 See also assembleHistoneDS()

    DASMiner: DAS library and browser for Matlab.
    Diogo Veiga, Jan 2009.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function histRegionsCoverage()</a>
0002 <span class="comment">% Coverage of histone modification marks grouped by regions (GM06990, chrm 7)</span>
0003 <span class="comment">%</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% SYNTAX: [] = histRegionsCoverage()</span>
0006 <span class="comment">%</span>
0007 <span class="comment">% See also assembleHistoneDS()</span>
0008 <span class="comment">%</span>
0009 <span class="comment">%    DASMiner: DAS library and browser for Matlab.</span>
0010 <span class="comment">%    Diogo Veiga, Jan 2009.</span>
0011 
0012 load(<span class="string">'GM06990chips_chrm7_RegionsView.mat'</span>, <span class="string">'regions'</span>);
0013 
0014 chipSets = {};
0015 counts = [];
0016 
0017 <span class="keyword">for</span> i=1:size(regions,2)
0018 
0019     res = false;
0020     
0021     <span class="keyword">for</span> j=1:size(chipSets,2)
0022         <span class="keyword">if</span> (strcmp(char(chipSets{1,j}),char(regions(i).samples)))
0023             res = true;
0024             <span class="keyword">break</span>;
0025         <span class="keyword">end</span>
0026     <span class="keyword">end</span>
0027     <span class="keyword">if</span> (res) <span class="comment">%found chipSet</span>
0028         counts(j) = counts(j) + 1;
0029     <span class="keyword">else</span> <span class="comment">%new chipSet</span>
0030         chipSets{1,end+1} = regions(i).samples;
0031         counts = [counts 1];
0032     <span class="keyword">end</span>
0033     
0034 <span class="keyword">end</span>
0035 
0036 explode = zeros(size(counts));
0037 [c,offset] = max(counts);
0038 explode(offset) = 1;
0039 
0040 h = pie(counts,explode); 
0041 colormap summer
0042 
0043 <span class="comment">%Label in the graph slice 49%, 31% and slice corresponding to all chips</span>
0044 
0045 textObjs = findobj(h,<span class="string">'Type'</span>,<span class="string">'text'</span>);
0046 set(textObjs,<span class="string">'String'</span>,<span class="string">''</span>);
0047 <span class="comment">%oldStr = get(textObjs,{'String'});</span>
0048 
0049 <span class="comment">%Label in the graph slice 49%</span>
0050 set(textObjs(1),<span class="string">'String'</span>,sprintf(<span class="string">'49%%\nH3K4me1\nH3K4me2\nH3K4me3\nH3ac\nH4ac'</span>));
0051 
0052 <span class="comment">%Label in the graph slice 31%</span>
0053 set(textObjs(56),<span class="string">'String'</span>,sprintf(<span class="string">'31%%\nH3K27me3\nH3K36me3\nH3K4me3\nH3K79me3\nH3K9me3\nCTCF'</span>));
0054         
0055</pre></div>
<hr><address>Generated on Tue 17-Feb-2009 16:59:45 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>